#pragma once

#include "Renderer/Buffer.h"

namespace Orange {
	/// <summary>
	/// ����ʵ�ֻ��� opengl api �Ķ��㻺��
	/// </summary>
	class OpenGLVertexBuffer : public VertexBuffer
	{
	public:
		OpenGLVertexBuffer(uint32_t size);
		OpenGLVertexBuffer(float* vertexs, uint32_t size);
		~OpenGLVertexBuffer();
		void bind() const override;
		void ubind() const override;
		void setLayout(BufferLayout& layout) override;
		BufferLayout getLayout() const override;
		void SetData(void* data, uint32_t size) override;

	private:
		uint32_t m_RendererId;
		BufferLayout m_layout;
	};

	class OpenGLIndexBuffer : public IndexBuffer
	{
	public:
		OpenGLIndexBuffer(uint32_t* indexs, uint32_t count);
		~OpenGLIndexBuffer();
		void bind() const override;
		void ubind() const override;
		virtual uint32_t getCount() const override;

	private:
		uint32_t m_RendererId;
		uint32_t m_count;
	};

}